In computer graphics rendering is a process of generating digital data that represents the projection of a three dimensional scene onto a two dimensional image plane in order to simulate the recording of the scene by, for example, a camera. The digital data generally represents the projection of surfaces of objects in a three dimensional scene, illuminated by one or more light sources, onto the two dimensional image plane. The two dimensional image is in the form of an array of picture elements (pixels). The rendering process may utilize a geometric model that specifies the position, shape and color of objects and light sources in a world space.
One approach to rendering is a two stage process comprised of a geometry stage and a rendering stage. In the geometry stage a data base of geometric descriptions of objects and light sources (the geometric model) is transformed from a world coordinate system (object space) into a view dependent coordinate system (screen space) taking into account a view point and view surface. The view point is a point in the object space from where the objects are being viewed to obtain the image. The view surface is the surface in the world space that corresponds to the screen space.
In the rendering stage, once the positions of the objects and the screen space are determined, each pixel is colored (assigned a color comprised of, typically, non-negative red, green, and blue values) depending on which objects are occluded or visible. Accordingly, color rendering is performed by determining which objects are visible from the view point within the bounds of the view surface and then determining the color of the light that is emitted or reflected from the visible objects in the direction of the view point.
A common rendering task in feature film visual effects is to integrate computer generated elements with a live action background. The computer generated (CG) elements or models range from organic characters animated via complex physical models to static objects like buildings or vehicles. Often, all of the light in the scene emanates from outside the object, and the object passively reflects incident radiance toward the camera. This process, called Image-based lighting (IBL), involves illuminating the CG elements (scene database) with images of light from the real world. IBL evolved from a reflection mapping technique in which panoramic images are used to texture maps on computer graphics models to show objects reflecting real or synthetic environments. In practice, these IBL renderings are frequently achieved using a number of heuristic techniques, mostly requiring labor intensive setup and tweaking by digital artists.
As computers get faster and global illumination algorithms improve, there is an increasing desire to calculate such “outside-in” image-based lighting situations using global illumination. One step in many global illumination algorithms is to compute, at a surface point, the radiance reflected toward some direction due to direct illumination (i.e., photons that have traveled directly from the light source to the surface, without having been reflected in between).
Generally, the contributions of the light reflected from the various surfaces in a scene to a pixel's value (representing the color and intensity of that pixel) are expressed in the form of one or more integrals equations, for example the Kajiya Rendering Equation. In particular, the reflected radiance integral describes the amount of light energy (radiance) reflected directly from a light source to a pixel's location on the view surface. This is the fundamental quantity that physically-based computer graphics rendering algorithms compute.
The integrand of the reflected radiance integral is the product of three functions, L, ƒr, and Vp, where L depends on the position, intensity, and output characteristics of light sources, ƒr (the bi-directional reflectance distribution function, or BRDF) depends on reflectance properties of the scene surfaces, and Vp (the visibility function) depends on the geometry of the scene. Since the reflected radiance integral will generally not have a closed form solution, numerical methods are used to evaluate it in order to generate pixel values. Typically, exact Monte Carlo methods or approximate methods have been used in computer graphics to numerically evaluate the reflected radiance.
Approximate methods are usually very fast but compute only an approximate value for reflected radiance. Therefore, they usually require significant additional hand tuning in order to obtain a visually realistic final rendered image. Exact algorithms have the property that if the algorithm runs for a long time, it is guaranteed to eventually yield arbitrarily low error. In other words, exact algorithms eventually converge to the correct solution, whereas this is not necessarily true for approximate algorithms. For this reason, exact algorithms are often preferred for high-end computer graphics applications. The most common exact method for computing reflected radiance under an environment map light source is Monte Carlo or Quasi-Monte Carlo BRDF weighted importance sampling.
In general, importance sampling estimates the value of an integral by sampling the integrand where it is likely to have the most energy, as specified by an importance function. In BRDF importance sampling, hemispherical samples are chosen relative to an importance function that weighs a particular direction of the hemisphere proportional to the value of the BRDF in that direction. For example, let ƒr(ω,n,ω′) be a BRDF that measures the amount of energy scattered from direction ω to direction ω′ at surface point p with normal n. To evaluate reflected radiance in direction ω from surface point p with surface BRDF ƒr(ω,n,ω′), the importance function I(ω′) is chosen proportional to ƒr(ω,n,ω′) (since n and ω are fixed, this is a function of ω′).
When ƒr is a Lambertian or Phong BRDF, methods exist for transforming samples drawn uniformly from the unit square into samples drawn according this importance function over the hemisphere. Samples over the unit square are drawn using independent uniform sampling, stratified sampling, or a Quasi-Monte Carlo low-discrepancy point sequence (such as the Halton sequence). These sample points are transformed to the hemisphere, and the resulting hemispherical directions are used as sample points in the standard importance-sampling estimator, weighted inversely proportional to the importance function I(ω′).
Unfortunately, the method of BRDF-based importance sampling used to evaluate the reflected radiance integrals has sub-optimal efficiency. This is because light source output L and scene visibility Vp may contribute significant energy to the reflected radiance integrand, but are ignored when placing random samples according to only the BRDF. When applied to complex real-world lighting situations, such as, for example, image-based lighting, BRDF-weighted importance sampling often misses the important features of the integrand and hence will require an enormous number of samples in order to compute an accurate image. Alternate importance sampling techniques take the light source L into account when placing samples, but ignore the effects of the scene visibility Vp and surface reflectance ƒr.